﻿@model IEnumerable<CDV.MC.MatrixDriver.WebApp.Data.MatrixInfo>
@{
    ViewData["Title"] = "矩阵列表";
}

<div id="matrixView" class="row matrixContainer">
    @foreach (var matrixItem in Model)
    {
        <div id=@(string.Concat("matrix_" , matrixItem.ID)) class="row matrixListItem">
            <div class="col-md-3">
                <a href=@("/Matrix/MatrixDetail?matrixId=" + matrixItem.ID)>
                    <img id="iconStatus" src="~/images/matrix.png" class=@(matrixItem.IsOnline ? "matrixIcon-online" : "matrixIcon-offline") />
                </a>
            </div>
            <div class="col-md-9">
                <dl class="dl-horizontal matrixListItem-title">
                    <dt>
                        @Html.DisplayNameFor(model => model.ID)
                    </dt>
                    <dd>
                        @Html.DisplayFor(modelItem => matrixItem.ID)
                    </dd>
                    <dt>
                        @Html.DisplayNameFor(model => model.Name)
                    </dt>
                    <dd>
                        @Html.ActionLink(matrixItem.Name, "MatrixDetail", new { matrixId = matrixItem.ID })
                    </dd>
                    <dt>
                        @Html.DisplayNameFor(model => model.Description)
                    </dt>
                    <dd>
                        @Html.DisplayFor(modelItem => matrixItem.Description)
                    </dd>
                    <dt>
                        @Html.DisplayNameFor(model => model.IPAddress)
                    </dt>
                    <dd>
                        @Html.DisplayFor(modelItem => matrixItem.IPAddress)
                    </dd>
                    <dt>
                        @Html.DisplayNameFor(model => model.Port)
                    </dt>
                    <dd>
                        @Html.DisplayFor(modelItem => matrixItem.Port)
                    </dd>
                    <dt>
                        @Html.DisplayNameFor(model => model.ScaleText)
                    </dt>
                    <dd>
                        @Html.DisplayFor(modelItem => matrixItem.ScaleText)
                    </dd>
                    <dt>
                        @Html.DisplayNameFor(model => model.IsOnline)
                    </dt>
                    <dd>
                        <div id="circleStatus" class=@(matrixItem.IsOnline?"matrixCircle-online":"matrixCircle-offline")
                             title=@(matrixItem.IsOnline ? "在线" : "离线") />
                    </dd>
                </dl>
            </div>
        </div>
    }
</div>
